import * as TYPES from "../action-types"
import { fetchPageProjectApi } from '../../api/projectManager'


let projectManager = {

    fetchPageProject(currPage, pageSize, keyword) {
        return async dispatch=>{
            let result = await fetchPageProjectApi(currPage, pageSize, keyword)
            dispatch({
                type:TYPES.FETCH_PAGE_PROJECT,
                result
            })
        }
    },

    showProjectDetail(toShow) {
        var result = {data:toShow};
        return dispatch=>{

            dispatch({
                type:TYPES.SHOW_PROJECT_DETAIL,
                result
            })
        }
    }
}
export default projectManager